package com.mihuspring.www.context;

import java.lang.annotation.Annotation;

public class AnnotationClassFilter implements ClassFilter{
  private Class<? extends Annotation>[] annotationClasses;
  public AnnotationClassFilter(Class<? extends Annotation>... annotationClasses){
    this.annotationClasses = annotationClasses;
  }
  @Override
  public boolean accept(Class<?> cla){
    for(Class annotationClass: annotationClasses){
      if(!cla.isAnnotationPresent(annotationClass)){
        return false;
      }
    }
    return true;
  }
}
